1. Field of the Invention
The present invention relates to a data processing apparatus that operates in a first mode and a second mode, a method for controlling the data processing apparatus, and a storage medium storing a program.
2. Description of the Related Art
Data processing apparatuses such as a printing apparatus and a copying apparatus have been expected to reduce electric power consumption thereof. There has been a technique for reducing the power consumption as an approach to meeting such a demand. The known technique allows the data processing apparatus in a standby mode to shift to a sleep mode by reducing (or shutting off) the electric power supplied to a main control unit for controlling the data processing apparatus to less than usual, so that the power consumption is further reduced.
Also, data processing apparatuses capable of being connected to networks have become common. Such a data processing apparatus receives and processes data and commands from an information processing apparatus such as a personal computer (PC) via a network, thereby executing a variety of processes.
If such a data processing apparatus employs the above technique for reducing the power consumption, however, data or a command received by the data processing apparatus via a network during the sleep mode are not promptly processed. This is because that if the data or command is received via the network, a main control unit is not in operation during the sleep mode, so that processing of the data or the command is delayed until the data processing apparatus is shifted to a standby mode by resumption of the power supply to the main control unit. When receiving data or a command via a network, the data processing apparatus is shifted to the standby mode by resumption of the power supply to the main control unit, and such a shift is hereinafter referred to as Wake on LAN (WOL).
There is a case where a response to a network packet used in a protocol such as a simple network management protocol (SNMP) for device management is delayed or not properly provided due to the above-described issue. Consequently, there is a case where a device is not properly managed by utility software on a PC that manages the device using the protocol such as SNMP. Particularly, when a data processing apparatus once performs WOL to be a standby mode and then shifts to a sleep mode again immediately after processing data or a command, there are cases where the data processing apparatus cannot respond to the following data or commands transmitted in sequence. Accordingly, a method has been discussed to control such that a data processing apparatus does not shift to a sleep mode for a certain time period after once performing WOL.
Japanese Patent Application Laid-Open No. 2009-151537 discusses a sub-control unit to which electric power is supplied even after the supply of power to a main control unit is shut off, and a proxy response technique in which data or a command received during a sleep mode is responded by the sub-control unit serving as proxy. In the method discussed in Japanese Patent Application Laid-Open No. 2009-151537, a memory in a processing unit that is supplied with the electric power even after shifting to the sleep mode includes a proxy response pattern storage region or a proxy response data storage region, so that the data in these regions is used for proxy response.
However, when all of data pieces or commands are controlled so as not to shift to the sleep mode for a certain time period subsequent to WOL, the following issue may occur. More specifically, when there are a number of devices transmitting data pieces or commands to the data processing apparatus on the network, the data processing apparatus cannot shift to the sleep mode at all.
On the other hand, it is not practical to respond to all of the data pieces or the commands by proxy with the use of the technique discussed in Japanese Patent Application Laid-Open No. 2009-151537 from a standpoint of reducing the power consumption of the data processing apparatus. If the data processing apparatus is configured to respond to all of the data pieces or the commands by proxy, the proxy response pattern storage region or the proxy response data storage region needs to have a large memory capacity. The large memory capacity may consume a large amount of electric power even in the sleep mode.